import React, { Component } from 'react';
import styles from '../messageList/messageList.module.css'
import { List, Avatar } from 'antd';

const data = [
    {
      title: 'Ant Design Title 1',
    },
    {
      title: 'Ant Design Title 2',
    },
    {
      title: 'Ant Design Title 3',
    },
    {
      title: 'Ant Design Title 4',
    },
  ];
class Messagelist extends Component {
    state = {
        res: ''
    }
   
    async componentDidMount(){
        // const _id = JSON.parse(localStorage.getItem('usersMessage'))._id
        const _id = '61f930ded092aea97b5c892b'
        const res = await post('/api/searchAttention',{
          _id,
        })
        console.log('拿到chaxun后的数据',res);
    }

    render() {
        return (
            <div className={styles.wrapper}>
                <div className={styles.text}>开发中～</div>
                <div className={styles.comtent}>
                    <List
                        itemLayout="horizontal"
                        dataSource={data}
                        renderItem={item => (
                            <List.Item>
                                <List.Item.Meta
                                    avatar={<Avatar src="https://joeschmoe.io/api/v1/random" />}
                                    title={<a href="https://ant.design">{item.title}</a>}
                                    description="Ant Design, a design language for background applications, is refined by Ant UED Team"
                                />
                            </List.Item>
                        )}
                    />,

                </div>
            </div>
        );
    }
}

export default Messagelist;
